<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>{% block title %}Home{% endblock %}</title>
        {% assets "main_css" %}
        <link rel="stylesheet" type="text/css" href="{{ ASSET_URL }}" />
        {% endassets %}
        <script src='https://www.google.com/recaptcha/api.js'></script>
    </head>
    <body>
        <div class="container">
            <div class="jumbotron">
                <h1><a href="{{ url_for('blog.home') }}">My Blog</a></h1>
                <p>Welcome to the blog!</p>
            </div>

            {% with messages = get_flashed_messages(with_categories=true) %}
                {% if messages %}
                    {% for category, message in messages %}
                        <div class="alert alert-{{ category }} alert-dismissible" role="alert">
                          <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                          {{ message }}
                        </div>
                    {% endfor %}
                {% endif %}
            {% endwith %}

            {% block body %}

            {% endblock %}
        </div>

        {% assets "main_js" %}
        <script type="text/javascript" src="{{ ASSET_URL }}"></script>
        {% endassets %}

        {% block js %}
        {% endblock %}
    </body>
</html>